package su.jiedai.entity;
import java.io.Serializable;
import java.util.Date;

import su.jiedai.dto.JiedaiDto;

public class JiedaiEntity implements Serializable {
	
	private static final long serialVersionUID = 1L;

	/* ID */
	private int  id;
			
	/* 日期 */
	private Date  jdDate;
			
	/* 凭证字号 */
	private String  jdKey;
			
	/* 摘要 */
	private String  jdDesc;
			
	/* 业务编号 */
	private String  jdCode;
			
	/* 余额方向,1借2贷3平 */
	private int  jdType;
			
	/* 借方本位币金额 */
	private double  jdAmountJie;
			
	/* 贷方本位币金额 */
	private double  jdAmountDai;

	/* 上年结转金额 */
	private double  jdAmountJiezhuan;
			
	/* 创建时间 */
	private Date  jdCreateTime;
			
	/* 状态，1有效，0删除 */
	private int  jdStatus;
	
	/* 余额，用于显示 */
	private double jdBalance;


	public double getJdAmountJiezhuan() {
		return jdAmountJiezhuan;
	}

	public void setJdAmountJiezhuan(double jdAmountJiezhuan) {
		this.jdAmountJiezhuan = jdAmountJiezhuan;
	}

	public double getJdBalance() {
		return jdBalance;
	}

	public void setJdBalance(double jdBalance) {
		this.jdBalance = jdBalance;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getJdDate() {
		return jdDate;
	}

	public void setJdDate(Date jdDate) {
		this.jdDate = jdDate;
	}

	public String getJdKey() {
		return jdKey;
	}

	public void setJdKey(String jdKey) {
		this.jdKey = jdKey;
	}

	public String getJdDesc() {
		return jdDesc;
	}

	public void setJdDesc(String jdDesc) {
		this.jdDesc = jdDesc;
	}

	public String getJdCode() {
		return jdCode;
	}

	public void setJdCode(String jdCode) {
		this.jdCode = jdCode;
	}

	public int getJdType() {
		return jdType;
	}

	public void setJdType(int jdType) {
		this.jdType = jdType;
	}

	public double getJdAmountJie() {
		return jdAmountJie;
	}

	public void setJdAmountJie(double jdAmountJie) {
		this.jdAmountJie = jdAmountJie;
	}

	public double getJdAmountDai() {
		return jdAmountDai;
	}

	public void setJdAmountDai(double jdAmountDai) {
		this.jdAmountDai = jdAmountDai;
	}

	public Date getJdCreateTime() {
		return jdCreateTime;
	}

	public void setJdCreateTime(Date jdCreateTime) {
		this.jdCreateTime = jdCreateTime;
	}

	public int getJdStatus() {
		return jdStatus;
	}

	public void setJdStatus(int jdStatus) {
		this.jdStatus = jdStatus;
	}
			
	public String getJdTypeStr(){
		if(this.jdType == JiedaiDto.JIEDAI_TYPE_DAI)return "贷";
		if(this.jdType == JiedaiDto.JIEDAI_TYPE_JIE)return "借";
		if(this.jdType == JiedaiDto.JIEDAI_TYPE_PING)return "平";
		return "未知";
	}
}

